<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class OrderList extends Model
{
    protected $guarded=[];
    //关联商品数据
    public function getGoods(){
        return $this->hasMany(Goods::class,'id','goods_id');
    }
//    关联订单数据
public function getOrders(){
        return $this->belongsTo(Order::class,'order_id','id');
}
}
